package com.xiyi.shouxin.entity.user.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.lang.Nullable;

import com.xiyi.shouxin.entity.user.Video;

public class VideoMapper implements RowMapper<Video> {
    @Override
    @Nullable
    public Video mapRow(@Nullable ResultSet rs, int rowNum) throws SQLException {
        Video video = new Video();
        if (rs == null) {
            return video;
        }
        video.setId(rs.getLong("id"));
        video.setName(rs.getString("name"));
        video.setThumb(rs.getString("thumb"));
        video.setUrl(rs.getString("url"));
        video.setVideoId(rs.getString("video_id"));
        video.setStatus(rs.getInt("status"));
        return video;
    }
}
